package ClassWork.Work_03;

import java.util.Scanner;

public class Number {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter a number: ");
        String number = sc.next();
        StringBuilder num = new StringBuilder(number);
        for (int i = num.length() - 1; i - 2 > 0; i -= 3) {
            num.insert(i - 2, ",");
        }
        System.out.println(num);
    }
}
